package com.wmada.toolkit.common.secure;

/**
 * @author will.ma
 * @date 2017/3/13
 */
public class PBKDF2Utils {

    private static final String SIGNATURE_ALGORITHM = "PBKDF2WithHmacSHA256";

    public static String getSignature(String message, String key) {
        Signature signature = new Signature(SIGNATURE_ALGORITHM, key);
        return signature.getSignature(message);
    }

    public static byte[] getSignature(byte[] data, String key) {
        Signature signature = new Signature(SIGNATURE_ALGORITHM, key);
        return signature.getSignature(data);
    }

}
